<?php
class ModelDelimanNhatkyhethong extends Model 
{
	public function getList($where = "")
	{
		$query = $this->db->query("SELECT * FROM `dlm_nhatkyhethong` WHERE 1=1 ".$where);
		return $query->rows;
	}
			
	public function insert($data)
	{		
		$ngaythaotac=$this->db->escape(@$data['ngaythaotac']);
		$chucnang=$this->db->escape(@$data['chucnang']);
		$hanhdong=$this->db->escape(@$data['hanhdong']);
		$csdl=$this->db->escape(@$data['csdl']);
		$truongdulieu=$this->db->escape(@$data['truongdulieu']);
		$dulieucu=$this->db->escape(@$data['dulieucu']);
		$dulieumoi=$this->db->escape(@$data['dulieumoi']);
		$nhanvienid=$this->db->escape(@$data['nhanvienid']);
		$masonhanvien=$this->db->escape(@$data['masonhanvien']);
		$tennhanvien=$this->db->escape(@$data['tennhanvien']);
				
		$field=array(
						
						'ngaythaotac',
						'chucnang',
						'hanhdong',
						'csdl',
						'truongdulieu',
						'dulieucu',
						'dulieumoi',
						'nhanvienid',
						'masonhanvien',
						'tennhanvien'
					);
		$value=array(
						
						$ngaythaotac,
						$chucnang,
						$hanhdong,
						$csdl,
						$truongdulieu,
						$dulieucu,
						$dulieumoi,
						$nhanvienid,
						$masonhanvien,
						$tennhanvien
					);
		return $this->db->insertData("dlm_nhatkyhethong",$field,$value);
	}	
}

?>